-- -*- Mode: LUA; tab-width: 2 -*-

peripheral {

	name = "Module for LHAASO Electron Detector";
	description = "Module used by LHAASO ED, includes temperature output and other information.";
	hdl_entity = "lhaaso_ed_wb";
	prefix = "lhaaso_ed";

	reg {
			 name = "Board temperature register";
			 description = "Temperature of current time, highest 16 bits used for integer and lowest 16 bits used for decimal.";

			 prefix = "TEMPERATURE";
			 field {
					name = "Temperature register";
					type = SLV;
					size = 32;
					access_bus = READ_WRITE;
					access_dev = READ_ONLY;
					clock = "refclk_i";
			 };
	};

	reg {
			 name = "NULL register";
			 description = "NULL";

			 prefix = "ED_NULL";
			 field {
					name = "NULL register";
					type = SLV;
					size = 32;
					access_bus = READ_WRITE;
					access_dev = READ_ONLY;
					clock = "refclk_i";
			 };
	};
	
	reg {
			name = "Temperature Valid Register";
			description = "Temperature Valid";
			prefix = "TEMPVALID";
			
			field {
				 name = "Temperature Valid register";
				 description = "write 1: Temperature output provides valid temperature\
                        write 0: Temperature output does not provide valid temperature";
				 type = BIT;
				 access_bus = READ_WRITE;
				 access_dev = READ_ONLY;
				 clock = "refclk_i";
			};
	 };	
};
